package com.spring.boot.controller;

import com.spring.boot.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fuc
 * @create 2021-01-02
 */
@RestController
public class HelloController {
  
  @Autowired Person person;

  @RequestMapping("/person")
  public Person person() {
    String userName = person.getUserName();
    System.out.println(userName);
    return person;
  }
}
